package org.hj.modules.act.procdef.service.impl;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.hj.modules.act.procdef.mapper.ProcdefMapper;
import org.hj.modules.act.procdef.service.ProcdefService;
import org.hj.modules.util.PageData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/** 
 * 说明： 流程管理接口实现类
 * 作者：Joson 
 * @version
 */
@Service(value="procdefServiceImpl")
@Transactional //开启事物
public class ProcdefServiceImpl implements ProcdefService {

	@Autowired
	private ProcdefMapper procdefMapper;
	
	/**列表
	 * @param page
	 * @throws Exception
	 */
	public List<PageData> list(Page page)throws Exception{
		return procdefMapper.datalistPage(page);
	}

	@Override
	public List<PageData> getpage(String keywords, Integer pageNo, Integer pageSize) {
		Integer no=(pageNo-1)*pageSize;
		return procdefMapper.getpage(keywords,  no,  pageSize);
	}

	@Override
	public int getTotal(String keywords) {
		return procdefMapper.getTotal(keywords);
	}

}

